class DeviceBean {
  int code;
  String message;
  List<Result> result;
  bool success;
  int timestamp;

  DeviceBean(
      {this.code, this.message, this.result, this.success, this.timestamp});

  DeviceBean.fromJson(Map<String, dynamic> json) {
    code = json['code'];
    message = json['message'];
    if (json['result'] != null) {
      result = new List<Result>();
      json['result'].forEach((v) {
        result.add(new Result.fromJson(v));
      });
    }
    success = json['success'];
    timestamp = json['timestamp'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['code'] = this.code;
    data['message'] = this.message;
    if (this.result != null) {
      data['result'] = this.result.map((v) => v.toJson()).toList();
    }
    data['success'] = this.success;
    data['timestamp'] = this.timestamp;
    return data;
  }
}

class Result {
  List<CheckProjectVos> checkProjectVos;
  String deviceCode;
  int deviceId;
  String deviceLonglat;
  String deviceName;
  int deviceTypeId;
  String deviceTypeName;

  Result(
      {this.checkProjectVos,
        this.deviceCode,
        this.deviceId,
        this.deviceLonglat,
        this.deviceName,
        this.deviceTypeId,
        this.deviceTypeName});

  Result.fromJson(Map<String, dynamic> json) {
    if (json['checkProjectVos'] != null) {
      checkProjectVos = new List<CheckProjectVos>();
      json['checkProjectVos'].forEach((v) {
        checkProjectVos.add(new CheckProjectVos.fromJson(v));
      });
    }
    deviceCode = json['deviceCode'];
    deviceId = json['deviceId'];
    deviceLonglat = json['deviceLonglat'];
    deviceName = json['deviceName'];
    deviceTypeId = json['deviceTypeId'];
    deviceTypeName = json['deviceTypeName'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.checkProjectVos != null) {
      data['checkProjectVos'] =
          this.checkProjectVos.map((v) => v.toJson()).toList();
    }
    data['deviceCode'] = this.deviceCode;
    data['deviceId'] = this.deviceId;
    data['deviceLonglat'] = this.deviceLonglat;
    data['deviceName'] = this.deviceName;
    data['deviceTypeId'] = this.deviceTypeId;
    data['deviceTypeName'] = this.deviceTypeName;
    return data;
  }
}

class CheckProjectVos {
  String projectCode;
  String projectContext;
  int projectId;
  String projectName;

  CheckProjectVos(
      {this.projectCode,
        this.projectContext,
        this.projectId,
        this.projectName});

  CheckProjectVos.fromJson(Map<String, dynamic> json) {
    projectCode = json['projectCode'];
    projectContext = json['projectContext'];
    projectId = json['projectId'];
    projectName = json['projectName'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['projectCode'] = this.projectCode;
    data['projectContext'] = this.projectContext;
    data['projectId'] = this.projectId;
    data['projectName'] = this.projectName;
    return data;
  }
}
